#ifndef RBT_FILE_SPY
#define RBT_FILE_SPY

#include "../typedef.h"
#include "../Text/Text.h"
#include <vector>

class FileSpy
{
public:
	enum FILE_SPY_NOTIFY_TYPE
	{
		FILE_SPY_NONE,
		FILE_SPY_ADDED,
		FILE_SPY_REMOVED,
		FILE_SPY_MODIFIED,
		FILE_SPY_RENAME
	};

	typedef void (*FileSpyCallBackFunc)(cstring&, FILE_SPY_NOTIFY_TYPE&, cstring&);

	static FileSpy* GetFileSpy();

	virtual void BeginSpy(FileSpyCallBackFunc fileSpyCallBackFunc = NULL);					
	virtual void EndSpy();														

	virtual ~FileSpy(void);

protected:
	FileSpy(void);

	static FileSpy* s_fileSpy; 
	static FileSpyCallBackFunc s_fileSpyCallBackFunc;

	static void SpyThread(void* arg);

	std::vector<HANDLE> m_vecThreadHandle;
};

#endif
